﻿@using ZDSoft.LMS.Domain;
@model DeliveryForm
@{
    ViewBag.Title = "新建调度";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Create</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>新建调度</legend>
        <div class="editor-label">
            托运人名称：
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.TransportOrder.ID, new SelectList(ViewData["tranportOrderList"] as System.Collections.IEnumerable, "ID", "CommissionedorName"), "---请选择---")
            <img alt="" src="@Url.Content("~/Content/Images/NotNullNotice.jpg")" />
            @Html.ValidationMessageFor(model => model.TransportOrder.ID)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.DeliveryDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DeliveryDate)
            @Html.ValidationMessageFor(model => model.DeliveryDate)
        </div>

        <div class="editor-label">
            状态名称：
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Status, new SelectList(ViewData["dictionaryList"] as System.Collections.IEnumerable, "ID", "Name"), "---请选择---")
            <img alt="" src="@Url.Content("~/Content/Images/NotNullNotice.jpg")" />
            @Html.ValidationMessageFor(model => model.Status)
        </div>
       
        <div class="editor-label">
            司机：
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Transporter.ID, new SelectList(ViewData["driverList"] as System.Collections.IEnumerable, "Id", "UserName"), "---请选择---")
            <img alt="" src="@Url.Content("~/Content/Images/NotNullNotice.jpg")" />
            @Html.ValidationMessageFor(model => model.Transporter.ID)
        </div>
        <div class="editor-label">
            车辆：
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.TransportCar.ID, new SelectList(ViewData["VehicleList"] as System.Collections.IEnumerable, "Id", "VehicleType"), "---请选择---")
            <img alt="" src="@Url.Content("~/Content/Images/NotNullNotice.jpg")" />
            @Html.ValidationMessageFor(model => model.TransportCar)
        </div>
        @*       
        @Html.HiddenFor(model => model.Status.ID)
        @Html.HiddenFor(model => model.Status.Name)
        @Html.HiddenFor(model => model.Status.Remark)
        @Html.HiddenFor(model => model.Status.Value)
        @Html.HiddenFor(model => model.Status.Version)
        *@
        <p>
            <input type="submit" value="Create" />
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("返回列表", "Index")
</div>
